Maple 2026 Questions and Posts

These are Posts and Questions associated with the product, Maple 2026

Consider a soil moisture transport problem with parameters: a = 9.88\times10^{-5} m/s,  b = -0.0065\ m3/m3, and D = 3.51*10^{-7} m2/s. The length is L=0.08 m, and no-flux (outflow) is assumed, meaning q=0. In this case θ0= 0.355$ and θL = 0.10.

A solution is expressed as a contour integral involving a complex-valued function V(k,x,t) and evaluated numerically in Maple using parameterized contours k1(r),k2(r),k3(s).

However, when this code is executed, Maple takes an extremely long time and appears to run indefinitely.

Could you suggest an alternative numerical or analytical approach ( that could improve efficiency when evaluating this type of contour integral?

a := 988/10000000;
b := -65/10000;
d := 351/1000000000;
q := 0;
theta0 := 355/1000;
thetaL := 1/10;
L := 8/100;
mu := a*(theta0 + b)/d;
c := a*(thetaL + b)/d;

mu := a*(theta0 + b)/d;
c := a*(thetaL + b)/d;

V := 1/(2*Pi)*exp(-d*k^2*t)*((exp(k*x*I)(mu - k*I) - exp(-mu*L)*exp(k*(L - x)*I)*(mu + L*I))*k*cos(k*L)/(k^2 + mu^2) + c*sin(k*L) - exp(k*L*I)(k*I + c)*sin(k*x)*(1 - exp(-mu*L)*exp(-I*k*L))/(mu + k*I) - (k*cos(k(L - x)) + c*sin(k(L - x)))*(1 - exp(-mu*L)*exp(k*L*I))/(mu - k*I) + 2*I*k*d*(k*cos(k(L - x)) + c*sin(k(L - x)))/(d*k^2 + a*q/d))/(k*cos(k*L) + c*sin(k*L)):

l := 5;
k1 := r -> l + I + r*exp(1/6*I*Pi);
k2 := r -> -l + I + r*exp(5/6*I*Pi);
k3 := s -> s + I;

dk1 := D(k1);
dk2 := D(k2);
dk3 := D(k3);

integrand1 := Re(eval(V, k = k1(r))*dk1(r) + eval(V, k = k2(r))*dk2(r));
integrand3 := Re(eval(V, k = k3(s))*dk3(s));
integrand2 := simplify(evalc(integrand1));

integrand4 := simplify(evalc(integrand3));
approx_u := proc(x, t) local temp1, temp2; temp1 := Int(eval(integrand2, [:-x = x, :-t = t]), r = 0 .. infinity, method = _d01amc); temp2 := Int(eval(integrand4, [:-x = x, :-t = t]), s = -L .. L, method = _d01ajc); evalf(temp1 + temp2); end proc;

Is there an easier or shorter way to do the following? Any handy package command?

RootOf(-(Int(1/sqrt(2*cos(_a)+RootOf(-(Int(1/sqrt(2*cos(_a)+_Z), _a = 0 .. Pi))+_a+c__2)), _a = 0 .. _Z))+x+c__2)

RootOf(-(Int(1/(2*cos(_a)+RootOf(-(Int(1/(2*cos(_a)+_Z)^(1/2), _a = 0 .. Pi))+_a+c__2))^(1/2), _a = 0 .. _Z))+x+c__2)

(1)

indets(RootOf(-(Int(1/(2*cos(_a)+RootOf(-(Int(1/(2*cos(_a)+_Z)^(1/2), _a = 0 .. Pi))+_a+c__2))^(1/2), _a = 0 .. _Z))+x+c__2), 'specfunc(anything, RootOf)')

{RootOf(-(Int(1/(2*cos(_a)+_Z)^(1/2), _a = 0 .. Pi))+_a+c__2), RootOf(-(Int(1/(2*cos(_a)+RootOf(-(Int(1/(2*cos(_a)+_Z)^(1/2), _a = 0 .. Pi))+_a+c__2))^(1/2), _a = 0 .. _Z))+x+c__2)}

(2)

subs(_a = _b, {RootOf(-(Int(1/(2*cos(_a)+_Z)^(1/2), _a = 0 .. Pi))+_a+c__2), RootOf(-(Int(1/(2*cos(_a)+RootOf(-(Int(1/(2*cos(_a)+_Z)^(1/2), _a = 0 .. Pi))+_a+c__2))^(1/2), _a = 0 .. _Z))+x+c__2)}[1])

RootOf(-(Int(1/(2*cos(_b)+_Z)^(1/2), _b = 0 .. Pi))+_b+c__2)

(3)

subs({RootOf(-(Int(1/(2*cos(_a)+_Z)^(1/2), _a = 0 .. Pi))+_a+c__2), RootOf(-(Int(1/(2*cos(_a)+RootOf(-(Int(1/(2*cos(_a)+_Z)^(1/2), _a = 0 .. Pi))+_a+c__2))^(1/2), _a = 0 .. _Z))+x+c__2)}[1] = RootOf(-(Int(1/(2*cos(_b)+_Z)^(1/2), _b = 0 .. Pi))+_b+c__2), RootOf(-(Int(1/(2*cos(_a)+RootOf(-(Int(1/(2*cos(_a)+_Z)^(1/2), _a = 0 .. Pi))+_a+c__2))^(1/2), _a = 0 .. _Z))+x+c__2))

RootOf(-(Int(1/(2*cos(_a)+RootOf(-(Int(1/(2*cos(_b)+_Z)^(1/2), _b = 0 .. Pi))+_b+c__2))^(1/2), _a = 0 .. _Z))+x+c__2)

(4)

NULL

Related question: Is that substitution mathematically correct or does the _a belong to the outermost RootOf?

Download parameters_in_nested_RootOf.mw

Maple 2026 and Maple 2025.2

Is this a bug in limit? or as designed?

Doing 

limit(sol,[_C3 = 0, _C4 = 0])

Gives internal error. But

limit(sol,_C3 = 0);
limit(%,_C4 = 0);

works and no error.

Worksheet below. I've had problems before with multilimit. I think I need to change my code to do limit one by one from now on.

interface(version);

`Standard Worksheet Interface, Maple 2026.0, Windows 10, March 05 2026 Build ID 2001916`

restart;

sol:=(piecewise(t <= 0,0,t <= Pi,(arctan(tan(t))*cos(t)*_C3*_C4+arctan(tan(t))*sin(t)*_C4^2-cos(t)*_C3*_C4*t+sin(t)*_C3^2*t)/(_C3*cos(t)+_C4*sin(t)),Pi < t,Pi*_C3*(tan(t)*_C3-_C4)/(tan(t)*_C4+_C3))+2*_C3^2+2*_C4^2)*(_C3*cos(t)+_C4*sin(t))/(2*_C3^2+2*_C4^2)

sol := (piecewise(t <= 0, 0, t <= Pi, (arctan(tan(t))*cos(t)*_C3*_C4+arctan(tan(t))*sin(t)*_C4^2-cos(t)*_C3*_C4*t+sin(t)*_C3^2*t)/(cos(t)*_C3+_C4*sin(t)), Pi < t, Pi*_C3*(tan(t)*_C3-_C4)/(tan(t)*_C4+_C3))+2*_C3^2+2*_C4^2)*(cos(t)*_C3+_C4*sin(t))/(2*_C3^2+2*_C4^2)

limit(sol,[_C3 = 0, _C4 = 0])

Error, (in limit/multi/ldegree1) invalid input: limit/multi/ReIm expects its 1st argument, f, to be of type polynom, but received _DIR1*cos(t)+_DIR2*sin(t)

limit(sol,_C3 = 0)

piecewise(t <= 0, _C4*sin(t), t <= Pi, (1/2)*arctan(tan(t))*sin(t)+_C4*sin(t), _C4*sin(t))

limit(%,_C4 = 0)

piecewise(t <= 0, 0, t <= Pi, (1/2)*arctan(tan(t))*sin(t), 0)

 

 

Download limit_problem_april_2_2026.mw

There seems to be a regression in Maple 2026 in the XMLTools:-ParseFile function.

As Maple2026 is not yet in the list of products to be chosen, I have added it in the subject.

Error, (in XMLTools:-ParseFile) invalid input: too many and/or wrong type of arguments passed to XMLTools:-NSXML:-Parser:-ParseFile; first unused argument is prolog = true

The test file is right from the help related to ParseFile.
Test_XML.mw

Page 1 of 1